home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 May / EnigmA AMIGA RUN 27 (1998)(G.R. Edizioni)(IT)[!][issue 1998-05].iso / recent2 / miami3-4.lha / Miami30_Install / Install_Miami next >
Text File  |  1998-02-24  |  14KB  |  529 lines

  1. ; $VER: Install_Miami 3.0 (22.02.98)
  2. (procedure P-check-system-version
  3.  (if (< (/ @installer-version 65536) 43)
  4.   (abort "The Miami installation script needs Installer\n"
  5.    "version 43 or higher. It is available from Aminet\n"
  6.    "and from www.nordicglobal.com")
  7.  )
  8.  (set #exec-version (/ (getversion) 65536))
  9.  (if (< #exec-version 37)
  10.   (abort "Miami needs Kickstart 2.04 or higher.\n")
  11.  )
  12.  (if (< #exec-version 39)
  13.   (set #ag-browser "AmigaGuide")
  14.   (set #ag-browser "MultiView")
  15.  )
  16. )
  17.  
  18. (procedure P-select-destination-directory
  19.  (if (exists "Miami:" (noreq))
  20.   (
  21.    (set #old-miami-assign 1)
  22.    (set #old-miami-assign-location (expandpath "Miami:"))
  23.    (set @default-dest
  24.     (askdir
  25.      (prompt "Select the directory where you want to "
  26.       "install Miami 3.0. You already have a 'Miami:' "
  27.       "assign on your system, so it is assumed that this "
  28.       "is the location of an older version of Miami that "
  29.       "you want to upgrade.")
  30.      (help "Select the directory where you want to "
  31.       "install Miami 3.0. Since you already have a 'Miami:' "
  32.       "assign on your system you should probably accept "
  33.       "the default.")
  34.      (default "Miami:")
  35.     )
  36.    )
  37.   ) (
  38.    (set #old-miami-assign 0)
  39.    (if (exists "Work:" (noreq))
  40.     (set @default-dest "Work:")
  41.     (set @default-dest "SYS:")
  42.    )
  43.    (set @default-dest
  44.     (askdir
  45.      (prompt "Select the directory where you want to "
  46.       "install Miami 3.1. An additional directory "
  47.       "will *NOT* be created at the location you specify.")
  48.      (help "Select the directory where you want to "
  49.       "install Miami 3.0. All necessary files will be copied "
  50.       "to that directory during installation. A new directory "
  51.       "will *NOT* be created at the location you specify. "
  52.       "This means if you want Miami to be installed in its "
  53.       "own directory then you need to create that directory "
  54.       "yourself first.")
  55.      (default @default-dest)
  56.     )
  57.    )
  58.   )
  59.  )
  60.  (makeassign "Miami" @default-dest)
  61. )
  62.  
  63. (procedure P-select-binary
  64.  (set #cpu-choice (if (patmatch "68000|68010" (database "cpu")) 0 1))
  65.  (set #cpu-choice
  66.   (askchoice
  67.    (prompt "Please select which version of\nMiami you want to use:")
  68.    (help "Miami exists in a 68000 version,\n and a 68020 version.\n"
  69.     "One of these versions will be installed.")
  70.    (choices "68000/010 version" "68020/030/040/060 version")
  71.    (default #cpu-choice)
  72.   )
  73.  )
  74. )
  75.  
  76. (procedure P-check-binary
  77.  (set #bin-choice
  78.   (select #cpu-choice
  79.    "000/Miami.000"
  80.    "020/Miami.020"
  81.   )
  82.  )
  83.  (if (not (exists (tackon #source-dir #bin-choice)))
  84.   (abort "Before you can install Miami you first need to\n"
  85.    "download and unpack the archive that contains the Miami\n"
  86.    "binary you want to install.")
  87.  )
  88. )
  89.  
  90. (procedure P-select-guis
  91.  (set #gui-options
  92.   (askoptions
  93.    (prompt "Please select which GUI modules you want to use with Miami. The "
  94.     "MUI and MUIMWB modules need MUI 3.8 or higher, which has to be installed "
  95.     "BEFORE installing Miami.")
  96.    (help "Miami supports several different user interface engines: "
  97.     "MUI, MUIMWB (a version of the MUI module with additional images, "
  98.     "for screens with 8 or more colors), and GTLayout "
  99.     "(using gtlayout.library, creating GadTools gadgets). Please select "
  100.     "which ones you want to install.")
  101.    (choices "MUI" "MUIMWB (MUI with MagicWB-style images)" "GTLayout")
  102.   )
  103.  )
  104.  (if (= #gui-options 0)
  105.   (abort "You need to install at least one GUI module.")
  106.  )
  107.  (if (not (= 0 (BITAND #gui-options 3))) (
  108.   (if (not (exists "MUI:Libs/muimaster.library" (noreq)))
  109.    (abort "You need to install MUI 3.8 before you can install GUI "
  110.     "modules for Miami.")
  111.   )
  112.   (if (< (/ (getversion "MUI:Libs/muimaster.library") 65536) 18)
  113.    (abort "Your installed MUI version is too old for Miami 3.0. "
  114.     "Please upgrade to MUI 3.8 or higher before installing Miami."
  115.    )
  116.   )
  117.  ))
  118. )
  119.  
  120. (procedure P-check-gui
  121.  (if (not (exists (tackon #source-dir #current-gui)))
  122.   (abort "Before you can install Miami you first need to\n"
  123.    "download and unpack the archives that contain the Miami\n"
  124.    "GUI modules you want to install.")
  125.  )
  126. )
  127.  
  128. (procedure P-check-guis
  129.  (if (= 1 (BITAND #gui-options 1)) (
  130.   (set #current-gui "MUI")
  131.   (P-check-gui)
  132.  ))
  133.  (if (= 2 (BITAND #gui-options 2)) (
  134.   (set #current-gui "MUI")
  135.   (P-check-gui)
  136.  ))
  137.  (if (= 4 (BITAND #gui-options 4)) (
  138.   (set #current-gui "GTLayout")
  139.   (P-check-gui)
  140.  ))
  141. )
  142.  
  143.  
  144. (procedure P-select-gui
  145.  (if (= 4 (BITAND #gui-options 4))
  146.   ((set #gui-choice-gtlayout "GTLayout") (set #gui-choice 2))
  147.   (set #gui-choice-gtlayout "")
  148.  )
  149.  (if (= 1 (BITAND #gui-options 1))
  150.   ((set #gui-choice-mui "MUI") (set #gui-choice 0))
  151.   (set #gui-choice-mui "")
  152.  )
  153.  (if (= 2 (BITAND #gui-options 2))
  154.   ((set #gui-choice-muimwb "MUIMWB") (set #gui-choice 1))
  155.   (set #gui-choice-muimwb "")
  156.  )
  157.  (set #gui-choice
  158.   (askchoice
  159.    (prompt "Please select which GUI module you want to use as the default "
  160.     "module for Miami")
  161.    (help "Miami supports several different user interface engines: "
  162.     "MUI, MUIMWB (a version of the MUI module with additional images, "
  163.     "for screens with 8 or more colors), and GTLayout "
  164.     "(using gtlayout.library, creating GadTools gadgets). Please select "
  165.     "which one you want to use as the default. Only modules that you "
  166.     "selected for installation earlier can be used. Note: If you have already "
  167.     "saved the settings with a Miami version 2.9 or higher then the GUI module "
  168.     "you seleted in Miami overrides the choice you make here.")
  169.    (choices #gui-choice-mui #gui-choice-muimwb #gui-choice-gtlayout)
  170.    (default #gui-choice)
  171.   )
  172.  )
  173.  (set #gui-choice-name (select #gui-choice "MUI" "MUIMWB" "GTLayout"))
  174. )
  175.  
  176. (procedure P-select-icon
  177.  (set #icon-choice
  178.   (askchoice
  179.    (prompt "Please select which icons you\nwant to use for Miami and\n"
  180.     "the utility programs:")
  181.    (help "Miami comes with three different\nicon styles. Please select\n"
  182.     "the one you prefer.")
  183.    (choices "do not install new icons" "standard" "Magic Workbench" "NewIcons")
  184.   )
  185.  )
  186. )
  187.  
  188. (procedure P-copy-file
  189.  (copyfiles
  190.   (source (tackon #source-dir #to-copy))
  191.   (dest @default-dest)
  192.   (optional force)
  193.  )
  194. )
  195.  
  196. (procedure P-set-tooltypes
  197.  (if (not (= #icon-choice 0)) (
  198.   (tooltype
  199.    (dest (tackon @default-dest "Miami"))
  200.    (noposition)
  201.   )
  202.   (tooltype
  203.    (dest (tackon @default-dest "MiamiInit"))
  204.    (noposition)
  205.   )
  206.   (tooltype
  207.    (dest (tackon @default-dest "MiamiRegister"))
  208.    (noposition)
  209.   )
  210.   (tooltype
  211.    (dest (tackon @default-dest "Miami.guide"))
  212.    (noposition)
  213.    (setdefaulttool #ag-browser)
  214.   )
  215.  ))
  216. )
  217.  
  218. (procedure P-add-to-startup
  219.  (if #old-miami-assign
  220.   (if (= (#old-miami-assign-location (expandpath @default-dest)))
  221.    (set #change-startup 0)
  222.    (set #change-startup 1)
  223.   )
  224.   (set #change-startup 1)
  225.  )
  226.  (if #change-startup
  227.   (
  228.    (set #startup-addition (cat
  229.     "assign Miami: \"" (expandpath @default-dest) "\"\n"
  230.     )
  231.    )
  232.    (if
  233.     (askbool
  234.      (prompt "It is NECESSARY that an assign "
  235.       "'Miami:' is created for the Miami installation "
  236.       "directory. Would you like Installer "
  237.       "to make the required change to your user-startup "
  238.       "file ? If you answer 'No' then you need to make the "
  239.       "addition yourself, manually, before you can use Miami.")
  240.      (help "It is NECESSARY that an assign "
  241.       "'Miami:' is created for the Miami installation "
  242.       "directory. Would you like Installer "
  243.       "to make the required change to your user-startup "
  244.       "file ? If you answer 'No' then you need to make the "
  245.       "addition yourself, manually, before you can use Miami. "
  246.       "You should only answer with 'No' if you prefer to edit "
  247.       "the user-startup file yourself. If you answer 'No' then "
  248.       "a file 'addition-to-user-startup' will be created in the "
  249.       "Miami installation directory instead. You need to add the "
  250.       "contents of that file to your user-startup file.")
  251.      (choices "Yes" "No")
  252.     )
  253.     (startup "Miami"
  254.      (command #startup-addition)
  255.      (prompt "Installer will modify your s:user-startup "
  256.       "script. The following lines will be added:\n\n"
  257.       #startup-addition)
  258.      (help "Installer will modify your s:user-startup "
  259.       "script. The following lines will be added:\n\n"
  260.       #startup-addition)
  261.     )
  262.     (textfile
  263.      (dest (tackon @default-dest "addition-to-user-startup"))
  264.      (append #startup-addition)
  265.     )
  266.    )
  267.   )
  268.  )
  269. )
  270.  
  271. (procedure P-set-envvars
  272.  
  273.  (set #env-equal-envarc (= (expandpath "ENV:") (expandpath "ENVARC:")))
  274.  (if (not (exists "ENV:MIAMI"))
  275.   (makedir "ENV:MIAMI")
  276.  )
  277.  (if (not #env-equal-envarc)
  278.   (if (not (exists "ENVARC:MIAMI"))
  279.    (makedir "ENVARC:MIAMI")
  280.   )
  281.  )
  282.  (textfile
  283.   (dest "ENV:MIAMI/GUI")
  284.   (append #gui-choice-name)
  285.  )
  286.  (if (not env-equal-envarc)
  287.   (copyfiles
  288.    (source "ENV:MIAMI/GUI")
  289.    (dest "ENVARC:MIAMI")
  290.   )
  291.  )
  292. )
  293.  
  294.  
  295. (welcome "Welcome to the Miami 3.0 installation.\n")
  296.  
  297. (set app-name "Miami 3.0")
  298.  
  299. (P-check-system-version)
  300.  
  301. (complete 0)
  302.  
  303. (set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
  304.  (expandpath @icon))
  305. )
  306.  
  307. (P-select-destination-directory)
  308.  
  309. (complete 5)
  310.  
  311. (P-select-binary)
  312.  
  313. (P-check-binary)
  314.  
  315. (complete 10)
  316.  
  317. (P-select-icon)
  318.  
  319. (complete 15)
  320.  
  321. (P-select-guis)
  322.  
  323. (P-select-gui)
  324.  
  325. (P-check-guis)
  326.  
  327. (complete 20)
  328.  
  329. ; start actual installation
  330.  
  331. ; delete obsolete files from older Miami versions
  332. (delete (tackon @default-dest "MiamiRemind.doc") (optional force))
  333. (delete (tackon @default-dest "MiamiInitSANA2") (optional force) (infos))
  334. (delete (tackon @default-dest "Miami.000") (optional force) (infos))
  335. (delete (tackon @default-dest "Miami.020") (optional force) (infos))
  336. (delete (tackon @default-dest "Miami.eval") (optional force) (infos))
  337.  
  338. (complete 25)
  339.  
  340. ; copy Miami binary selected by user
  341. (set #to-copy (select #cpu-choice "000/Miami.000" "020/Miami.020"))
  342. (copyfiles
  343.  (source (tackon #source-dir #to-copy))
  344.  (dest @default-dest)
  345.  (newname "Miami")
  346.  (optional force)
  347. )
  348.  
  349. (complete 30)
  350.  
  351. ; copy individual files
  352. (set #to-copy "main/CHANGES") (P-copy-file)
  353. (set #to-copy "main/Miami.guide") (P-copy-file)
  354. (set #to-copy "main/MiamiArp") (P-copy-file)
  355. (set #to-copy "main/MiamiFinger") (P-copy-file)
  356. (set #to-copy "main/MiamiIfConfig") (P-copy-file)
  357. (set #to-copy "main/MiamiInit") (P-copy-file)
  358. (complete 40)
  359. (set #to-copy "main/MiamiMapMBone") (P-copy-file)
  360. (set #to-copy "main/MiamiMRInfo") (P-copy-file)
  361. (set #to-copy "main/MiamiMRouteD") (P-copy-file)
  362. (set #to-copy "main/MiamiMTrace") (P-copy-file)
  363. (set #to-copy "main/MiamiNetStat") (P-copy-file)
  364. (set #to-copy "main/MiamiPing") (P-copy-file)
  365. (set #to-copy "main/MiamiRegister") (P-copy-file)
  366. (complete 50)
  367. (set #to-copy "main/MiamiRemind") (P-copy-file)
  368. (set #to-copy "main/MiamiResolve") (P-copy-file)
  369. (set #to-copy "main/MiamiRoute") (P-copy-file)
  370. (set #to-copy "main/MiamiSysCtl") (P-copy-file)
  371. (set #to-copy "main/MiamiTCPDump") (P-copy-file)
  372. (set #to-copy "main/MiamiTraceRoute") (P-copy-file)
  373.  
  374. (complete 60)
  375.  
  376. ; copy libraries
  377. (if (not (exists (tackon @default-dest "Libs")))
  378.  (makedir (tackon @default-dest "Libs"))
  379. )
  380. (copyfiles
  381.  (source (tackon #source-dir "main/Libs"))
  382.  (dest (tackon @default-dest "Libs"))
  383.  (optional force)
  384.  (all)
  385. )
  386.  
  387. (complete 70)
  388.  
  389. ; copy GUI modules
  390. (if (= 1 (BITAND #gui-options 1)) (
  391.  (copyfiles
  392.   (source (tackon #source-dir "MUI/MUI.MiamiGui"))
  393.   (dest (tackon @default-dest "Libs"))
  394.   (optional force)
  395.  )
  396.  (copyfiles
  397.   (source (tackon #source-dir "MUI/MUI.MiamiToolsGui"))
  398.   (dest (tackon @default-dest "Libs"))
  399.   (optional force)
  400.  )
  401. ))
  402.  
  403. (if (= 2 (BITAND #gui-options 2)) (
  404.  (run (cat "\"" (tackon #source-dir "MUI/spatch") "\" -oRAM:MUIMWB.MiamiGui \"-p"
  405.   (tackon #source-dir "MUI/MUIMWB.pch") "\" \"" (tackon #source-dir "MUI/MUI.MiamiGui") "\""))
  406.  (copyfiles
  407.   (source "RAM:MUIMWB.MiamiGui")
  408.   (dest (tackon @default-dest "Libs"))
  409.   (optional force)
  410.   (all)
  411.  )
  412.  (delete "RAM:MUIMWB.MiamiGui")
  413.  (copyfiles
  414.   (source (tackon #source-dir "MUI/MUI.MiamiToolsGui"))
  415.   (dest (tackon @default-dest "Libs"))
  416.   (optional force)
  417.  )
  418. ))
  419.   
  420. (if (= 4 (BITAND #gui-options 4)) (
  421.  (copyfiles
  422.   (source (tackon #source-dir "GTLayout/GTLayout.MiamiGui"))
  423.   (dest (tackon @default-dest "Libs"))
  424.   (optional force)
  425.  )
  426.  (copyfiles
  427.   (source (tackon #source-dir "GTLayout/GTLayout.MiamiToolsGui"))
  428.   (dest (tackon @default-dest "Libs"))
  429.   (optional force)
  430.  )
  431.  (copylib
  432.   (source (tackon #source-dir "GTLayout/gtlayout.library"))
  433.   (dest "LIBS:")
  434.   (prompt "The Installer is about to install gtlayout.library "
  435.   "in your LIBS: directory.")
  436.   (help "The GTLayout GUI module needs gtlayout.library for layout generation. "
  437.   "If you skip this step during the installation, you have to "
  438.   "install gtlayout.library manually somewhere within your LIBS: "
  439.   "assign.")
  440.   (confirm)
  441.  )
  442. ))
  443.  
  444. (complete 80)
  445.  
  446. ; set icons
  447.  
  448. (if (not (= #icon-choice 0)) (
  449.  (set #to-copy
  450.   (select #icon-choice
  451.    ""
  452.    "main/Icons/Standard/Miami.info"
  453.    "main/Icons/MagicWB/Miami.info"
  454.    "main/Icons/NewIcons/Miami.info"
  455.   )
  456.  )
  457.  (copyfiles
  458.   (source (tackon #source-dir #to-copy))
  459.   (dest @default-dest)
  460.  )
  461.  (copyfiles
  462.   (source (tackon #source-dir #to-copy))
  463.   (dest @default-dest)
  464.   (newname "MiamiInit.info")
  465.  )
  466.  (copyfiles
  467.   (source (tackon #source-dir #to-copy))
  468.   (dest @default-dest)
  469.   (newname "MiamiRegister.info")
  470.  )
  471.  (copyfiles
  472.   (source (tackon #source-dir #to-copy))
  473.   (dest "ENV:Sys")
  474.   (newname "def_MiamiApp.info")
  475.  )
  476.  (copyfiles
  477.   (source (tackon #source-dir #to-copy))
  478.   (dest "ENV:Sys")
  479.   (newname "def_MiamiAppOnline.info")
  480.  )
  481.  (copyfiles
  482.   (source (tackon #source-dir #to-copy))
  483.   (dest "ENVARC:Sys")
  484.   (newname "def_MiamiApp.info")
  485.  )
  486.  (copyfiles
  487.   (source (tackon #source-dir #to-copy))
  488.   (dest "ENVARC:Sys")
  489.   (newname "def_MiamiAppOnline.info")
  490.  )
  491.  (set #to-copy "main/CHANGES.info") (P-copy-file)
  492.  (set #to-copy "main/Miami.guide.info") (P-copy-file)
  493.  (if (= #icon-choice 3) (
  494.   (if (exists "ENV:Sys/def_amigaguide.info")
  495.    (copyfiles
  496.     (source "ENV:Sys/def_amigaguide.info")
  497.     (dest @default-dest)
  498.     (newname "Miami.guide.info")
  499.    )
  500.   )
  501.   (if (exists "ENV:Sys/def_ascii.info")
  502.    (copyfiles
  503.     (source "ENV:Sys/def_ascii.info")
  504.     (dest @default-dest)
  505.     (newname "CHANGES.info")
  506.    )
  507.   )
  508.  ))
  509. ))
  510.  
  511. (complete 85)
  512.  
  513. (P-set-tooltypes)
  514.  
  515. (complete 90)
  516.  
  517. (P-set-envvars)
  518.  
  519. (complete 95)
  520.  
  521. (P-add-to-startup)
  522.  
  523. (complete 100)
  524.  
  525. (exit "The installation of Miami is finished. If you are "
  526.  "upgrading from an earlier version of Miami then you need "
  527.  "to execute the Shell command `avail flush' or reboot your "
  528.  "computer before starting Miami 3.0.")
  529.